function sum() {
    const args = [...arguments]
    const fn = function() {
        args.push(...arguments)
        return fn
    }
    fn.toString = () => args.reduce((n1, n2) => n1 + n2)
    return fn
}